import React, { Component } from 'react';

class Index extends Component {
    constructor(props){
        super(props);
        this.state ={
            msg:"hello word",
            count:10,
            skills:["html","css","vue","react"]
        }
    }
    render() {
        const ListItem =this.state.skills.map(item=>{
            return (<div key={item}>{item}</div>)
        })
        return (
            <div>
                <button onClick={this.handleClick.bind(this,this.state.count)}>{this.state.msg}</button>
            <div>
              {ListItem}
            </div>
            </div>
        );
    }
    handleClick=(params)=>{
        // this.setState({
        //     msg:"xjj"
        // })
        console.log(params);
    }
}
export default Index;
